package treePackage;

import java.util.Map;

import parser.Block;

public class FloorplanSlice {

	private SliceType type;
	private Map<String, Block> leftBlockGroup; /*
												 * left means it is the left
												 * operand within the
												 * corresponding polish exp.
												 */
	private Map<String, Block> rightBlockGroup; /*
												 * left means it is the left
												 * operand within the
												 * corresponding polish exp.
												 */

	public FloorplanSlice(SliceType type, Map<String, Block> leftBlockGroup,
			Map<String, Block> rightBlockGroup) {
		this.type = type;
		this.setLeftBlockGroup(leftBlockGroup);
		this.setRightBlockGroup(rightBlockGroup);
	}

	public void setType(SliceType type) {
		this.type = type;
	}

	public SliceType getType() {
		return type;
	}

	public Map<String, Block> getLeftBlockGroup() {
		return leftBlockGroup;
	}

	public void setLeftBlockGroup(Map<String, Block> leftBlockGroup) {
		this.leftBlockGroup = leftBlockGroup;
	}

	public Map<String, Block> getRightBlockGroup() {
		return rightBlockGroup;
	}

	public void setRightBlockGroup(Map<String, Block> rightBlockGroup) {
		this.rightBlockGroup = rightBlockGroup;
	}

	public String find_name(Map<String, Block> blocks) {

		for (Block b : blocks.values()) {
			return b.getBlockName();
		}

		return null;
	}

}
